package org.mango.test;

import org.mango.bean.B;
import org.mango.bean.C;
import org.mango.validator.util.ValidUtil;

import java.util.List;

/**
 * Created by meigang on 17/9/17.
 */
public class ThreadTest2 implements Runnable{

    public void run() {
        for(int i=0;i<10000;i++){
            C c = new C();
            c.setA1(i+"");
            //a.setA2("jkjk");
            c.setA0(1);
            B b = new B();
            //b.setB3("xxxx");
            b.setB1("mango");
            c.setB(b);
            List<String> msgList = ValidUtil.validMyAnno(c, null, false);
            System.out.println("test2:"+msgList);
            try {
                Thread.sleep(3000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    public static void main(String[] args){
        ThreadTest tt1 = new ThreadTest();
        Thread t1 = new Thread(tt1);
        t1.start();
        ThreadTest2 tt2 = new ThreadTest2();
        Thread t2 = new Thread(tt2);
        t2.start();

    }
}
